﻿@{
    ViewBag.Title = "编辑字典";
    Layout = "~/Views/Shared/_Layout.cshtml";
}
@model DataDictionaryDto
<div class="row">
    @using (Html.BeginHBootstrap_Box("编辑字典"))
    {
        using (Html.BeginForm("Edit", "DataDictionary", FormMethod.Post, new { id = "postForm", @class = "form-horizontal", onsubmit = "return validateCallback(this,navTabAjaxDone)" }))
        {
                @Html.HiddenFor(m => m.Id)
                <div class="form-group">
                    <label class="col-sm-3 control-label">
                        <span class="text-danger">*</span>字典类型：</label>
                    <div class="col-sm-8">
                        @Html.DropDownListFor(m => m.ParentId, Model.ParentDictionaryList, new { @class = "form-control chosen-select", @disabled = "disabled" })
                        @Html.ValidationMessageFor(m => m.ParentId)
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-3 control-label">
                        <span class="text-danger">*</span>字典描述：</label>
                    <div class="col-sm-8">
                        @Html.TextBoxFor(m => m.Title, new { @class = "form-control" })
                        @Html.ValidationMessageFor(m => m.Title)
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-3 control-label">
                        <span class="text-danger">*</span>字典Key值：</label>
                    <div class="col-sm-8">
                        @Html.TextBoxFor(m => m.Code, new { @class = "form-control" })
                        @Html.ValidationMessageFor(m => m.Code)
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-3 control-label">
                        <span class="text-danger">*</span>排序：</label>
                    <div class="col-sm-8">
                        @Html.TextBoxFor(m => m.Sort, new { @class = "form-control" })
                        @Html.ValidationMessageFor(m => m.Sort)
                    </div>
                </div>
                <div class="form-group">
                    <div class="col-sm-4 col-sm-offset-3">
                        <button class="btn btn-primary" type="submit">
                            提交</button>
                        <a class="btn btn-default" type="button" href="@Url.Action("Index", "DataDictionary")" >
                            取消</a>
                    </div>
                </div>
        }
    }
</div>

